package Game.Online.Messages 
{
	import Box2D.Common.Math.b2Vec2;
	import flash.utils.ByteArray;
	import Game.Online.OnlineManager;
	/**
	 * ...
	 * @author Yevgeniy Logachev
	 */
	public class MessageDoRocket extends Message
	{
		public function MessageDoRocket(id:String = null)
		{
			if (id == null)
			{
				id = OnlineManager.instance.connection.id;
			}
			super(MessagesDefs.k_MESSAGE_DO_ROCKET, id);
			
			setData(0);
		}
		
		public function setData(rocketType:int):void
		{
			m_data.position = MSG_OFFSET_ID;
			m_data.readUTF();
			
			m_data.writeInt(rocketType);
		}
		
		public function get rocketType():int
		{
			m_data.position = MSG_OFFSET_ID;
			m_data.readUTF();
			
			return m_data.readInt();
		}
	}
}